﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using ChurchWebsite.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ChurchWebsite.Areas.Website.Controllers
{
    public class MagazineController : BaseController
    {
        //
        // GET: /Website/Magazine/

        public ActionResult Index()
        {
            return View();
        }
        public JsonResult AddMagazine(EntityMagazine Magazine)
        {
            return Json(new BLL_Website().AddMagazhine(Magazine),JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateMagazine(EntityMagazine Magazine)
        {
            return Json(new BLL_Website().UpdateMagazhine(Magazine), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteMagazine(Guid dataId)
        {
            return Json(new BLL_Website().DeleteMagazhine(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetMagazine()
        {
            return Json(new BLL_Website().GetMagazhines(), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetMagazines(Guid dataId)
        {
            return Json(new BLL_Website().GetMagazhine(dataId), JsonRequestBehavior.AllowGet);
        }
    }
}
